package com.ruoyi.gas.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.gas.mapper.ScheduleRegisterMapper;
import com.ruoyi.gas.domain.ScheduleRegister;
import com.ruoyi.gas.service.IScheduleRegisterService;

/**
 * 预约登记
Service业务层处理
 *
 * @author h w
 * @date 2022-12-09
 */
@Service
public class ScheduleRegisterServiceImpl implements IScheduleRegisterService
{
    @Autowired
    private ScheduleRegisterMapper scheduleRegisterMapper;

    /**
     * 查询预约登记

     *
     * @param registerId 预约登记
主键
     * @return 预约登记

     */
    @Override
    public ScheduleRegister selectScheduleRegisterByRegisterId(Long registerId)
    {
        return scheduleRegisterMapper.selectScheduleRegisterByRegisterId(registerId);
    }

    /**
     * 查询预约登记
列表
     *
     * @param scheduleRegister 预约登记

     * @return 预约登记

     */
    @Override
    public List<ScheduleRegister> selectScheduleRegisterList(ScheduleRegister scheduleRegister)
    {
        return scheduleRegisterMapper.selectScheduleRegisterList(scheduleRegister);
    }

    /**
     * 查询预约登记
     列表
     *
     * @param scheduleRegister 预约登记

     * @return 预约登记

     */
    @Override
    public List<ScheduleRegister> selectScheduleRegisterRecentList(ScheduleRegister scheduleRegister)
    {
        return scheduleRegisterMapper.selectScheduleRegisterRecentList(scheduleRegister);
    }

    /**
     * 新增预约登记

     *
     * @param scheduleRegister 预约登记

     * @return 结果
     */
    @Override
    public int insertScheduleRegister(ScheduleRegister scheduleRegister)
    {
        scheduleRegister.setCreateTime(DateUtils.getNowDate());
        return scheduleRegisterMapper.insertScheduleRegister(scheduleRegister);
    }

    /**
     * 修改预约登记

     *
     * @param scheduleRegister 预约登记

     * @return 结果
     */
    @Override
    public int updateScheduleRegister(ScheduleRegister scheduleRegister)
    {
        scheduleRegister.setUpdateTime(DateUtils.getNowDate());
        return scheduleRegisterMapper.updateScheduleRegister(scheduleRegister);
    }

    /**
     * 批量删除预约登记

     *
     * @param registerIds 需要删除的预约登记
主键
     * @return 结果
     */
    @Override
    public int deleteScheduleRegisterByRegisterIds(Long[] registerIds)
    {
        return scheduleRegisterMapper.deleteScheduleRegisterByRegisterIds(registerIds);
    }

    /**
     * 删除预约登记
信息
     *
     * @param registerId 预约登记
主键
     * @return 结果
     */
    @Override
    public int deleteScheduleRegisterByRegisterId(Long registerId)
    {
        return scheduleRegisterMapper.deleteScheduleRegisterByRegisterId(registerId);
    }
}
